<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
  <head> 
	<%@ include file="/platform/style.jsp"%>
	<style>
		.ss0{color:red}
	</style>
	<script>
	function query(){
		$w.execForm()
	}
	function editFloor(id){
		window.parent.$w.openDialog({url:ctx+'/floor/FloorPage@show.page?bean.id='+id,title:"编辑楼层 ",w:540,h:300,afterClose:function(re){
			if(re)$w.execForm();
		}});
	}
	function floorCategory(id){
		$w.openDialog({url:ctx+'/floor/FloorPage@floorCategory.page?bean.floorid='+id,title:"楼层类目 ",w:700,h:400,maximized:true,afterClose:function(re){
			if($w.listFlesh)$w.execForm();
		}});
	}
	function shelves(){
		$w.doUrl(ctx+"/floor/FloorPage@updatestatus.page?bean.status=1",$("#queryForm").serializeArray(),function(){query()})
	}
	function offshelf(){
		$w.doUrl(ctx+"/floor/FloorPage@updatestatus.page?bean.status=0",$("#queryForm").serializeArray(),function(){query()})
		
	}
	</script>
  </head>
  
  <body class="easyui-layout">
	<div data-options="region:'center'" class="bodybg">
		<!-- 查询区域 -->
		<form id="queryForm" action="/floor/FloorPage.page" method="post">
		<div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
			<a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="shelves()" style="width:50px;">上架</a>
			<a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="offshelf()" style="width:50px;">下架</a>
		</div>
		<div class="ui_line" style="margin-top:10px"></div>
		<!-- 数据列表区域 -->
			<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false">
				<thead>
					<tr class="ui_th">
						<td width="35" align="center"><input type="checkbox" onclick="$selAllTbBoxs(this)"></td>
						<td width="40">ID</td>
						<td width="100">楼层</td>
						<td width="160">楼层名称</td>
						<td>所包含楼层类目</td>
						<td width="80">状态</td>
						<td width="150" align="center">修改</td>
					</tr>
				</thead>
				<tbody>
				<w:iterate id="info" bind="resultList_">
					<tr class="ui_td">
						<td align="center"><input type="checkbox" name="primaryKey_" value="<w:write bind="#info.id"/>"></td>
						<td><w:write bind="#info.id"/></td>
						<td><w:write bind="#info.code"/></td>
						<td><w:write bind="#info.name"/></td>
						<td><w:write bind="#info.itemsname"/></td>
						<td><span class="ss<w:write bind="#info.status"/>"><w:write bind="#info.status" format="[下架,上架]"/><span></td>
						<td align="center">
							<a href="javascript:void(0);" class="ui_btn marginR8" onclick="editFloor(<w:write bind="#info.id"/>)">修改</a><a href="javascript:void(0);" class="ui_btn" onclick="floorCategory(<w:write bind="#info.id"/>)">楼层类目</a>
						</td>
					</tr>
				</w:iterate>
				</tbody>
			</table>
		</form>
	</div>
  </body>
</html>
